1
0

Compare commits

...

10 Commits

12 changed files with 171 additions and 17 deletions

6
.chezmoiexternal.toml Normal file
View File

@ -0,0 +1,6 @@
[".cache/nu_scripts"]
type = "archive"
url = "https://github.com/nushell/nu_scripts/archive/refs/heads/main.tar.gz"
exact = true
stripComponents = 1
refreshPeriod = "168h"

View File

@ -8,7 +8,6 @@ tap "koekeishiya/formulae"
brew "bat"
brew "bison"
brew "black"
brew "python@3.9"
brew "ccache"
brew "chezmoi"
brew "cmake"
@ -28,14 +27,17 @@ brew "mdbook"
brew "neovim"
brew "ninja"
brew "node"
brew "nushell"
brew "or-tools"
brew "pandoc"
brew "pinentry-mac"
brew "pipx"
brew "poetry"
brew "prettier"
brew "python@3.9"
brew "ripgrep"
brew "rustup-init"
brew "scip"
brew "starship"
brew "tectonic"
brew "texlab"
@ -45,20 +47,23 @@ brew "xonsh"
brew "zoxide"
brew "zplug"
brew "dekker1/minizinc/choco"
brew "dekker1/minizinc/chuffed"
brew "dekker1/minizinc/flatzingo"
brew "dekker1/minizinc/fzn-oscar-cbls"
brew "dekker1/minizinc/fzn-picat"
brew "dekker1/minizinc/geas"
brew "dekker1/minizinc/jacop"
brew "dekker1/minizinc/scip"
brew "dekker1/minizinc/open-wbo"
brew "dekker1/minizinc/yuck"
brew "koekeishiya/formulae/skhd"
brew "koekeishiya/formulae/yabai"
cask "alfred"
cask "calibre"
cask "chromium"
cask "discord"
cask "docker"
cask "firefox"
cask "fleet"
cask "font-atkinson-hyperlegible"
cask "font-ibm-plex"
cask "font-iosevka"
@ -69,7 +74,7 @@ cask "mactex-no-gui"
cask "minizincide"
cask "mirrorop"
cask "multipass"
cask "protonvpn"
cask "notion"
cask "signal"
cask "skim"
cask "sublime-merge"
@ -79,6 +84,8 @@ cask "zoom"
cask "zotero"
cask "zulip"
mas "1Password for Safari", id: 1569813296
mas "Baking Soda", id: 1601151613
mas "Kagi Inc.", id: 1622835804
mas "Keynote", id: 409183694
mas "Microsoft Excel", id: 462058435
mas "Microsoft Word", id: 462054704
@ -90,4 +97,7 @@ mas "Slack", id: 803453959
mas "Textual IRC Client", id: 1262957439
mas "The Unarchiver", id: 425424353
mas "Things", id: 904280696
mas "Userscripts-Mac-App", id: 1463298887
mas "Vinegar", id: 1591303229
mas "WhatsApp", id: 1147396723
mas "Wipr", id: 1320666476

View File

@ -1,15 +1,15 @@
font_family Iosevka Term Slab
font_family Iosevka Term
bold_font auto
italic_font auto
bold_italic_font auto
cursor_shape underline
font_size 16.0
font_size 14.0
confirm_os_window_close 0
shell xonsh
shell nu
# BEGIN_KITTY_THEME
# Catppuccin-Latte

View File

@ -1,3 +1,4 @@
[misc]
# Don't ask for confirmations
#assume_yes = true

View File

@ -32,6 +32,8 @@ $OPTCLUSTER = "compute.optimisation-2020.cloud.edu.au"
#> CMake settings
$CMAKE_EXPORT_COMPILE_COMMANDS = "1" # output compile-commands.json for clangd
$CMAKE_GENERATOR = "Ninja Multi-Config" # use Ninja generator by default
$CMAKE_C_COMPILER_LAUNCHER = "ccache"
$CMAKE_CXX_COMPILER_LAUNCHER = "ccache"
#> FZF
$FZF_DEFAULT_COMMAND = "fd --type f"

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,9 @@
if not 'config' in $env {
$env.config = ([] | into record)
}
$env.config = ($env.config | upsert show_banner false)
$env.config = ($env.config | upsert rm.always_trash true)
$env.config = ($env.config | upsert edit_mode vi)
$env.config = ($env.config | upsert history.max_size 100000)
$env.config = ($env.config | upsert footer_mode auto)
$env.config = ($env.config | upsert history.file_format "sqlite")

View File

@ -0,0 +1,83 @@
# Nushell Environment Config File
### Load standardised prompt "starship"
# TEMP: Custom vi prompt indicators
$env.PROMPT_INDICATOR_VI_INSERT = ""
$env.PROMPT_INDICATOR_VI_NORMAL = ""
source ~/.cache/starship/init.nu
# Specifies how environment variables are:
# - converted from a string to a value on Nushell startup (from_string)
# - converted from a value back to a string when running external commands (to_string)
# Note: The conversions happen *after* config.nu is loaded
$env.ENV_CONVERSIONS = {
"PATH": {
from_string: { |s| $s | split row (char esep) | path expand --no-symlink }
to_string: { |v| $v | path expand --no-symlink | str join (char esep) }
}
}
# Directories to search for scripts when calling source or use
#
# By default, <nushell-config-dir>/scripts is added
$env.NU_LIB_DIRS = [ ($nu.default-config-dir | path join 'scripts') ]
# Directories to search for plugin binaries when calling register
#
# By default, <nushell-config-dir>/plugins is added
$env.NU_PLUGIN_DIRS = [ ($nu.default-config-dir | path join 'plugins') ]
# Add entries to PATH:
# From MacOS helper (/usr/libexec/path_helper)
$env.PATH = ($env.PATH | split row (char esep) | append "/Library/TeX/texbin")
$env.PATH = ($env.PATH | split row (char esep) | append "/Library/Apple/usr/bin")
$env.PATH = ($env.PATH | split row (char esep) | append "/opt/homebrew/bin")
$env.PATH = ($env.PATH | split row (char esep) | append "/opt/homebrew/sbin")
$env.PATH = ($env.PATH | split row (char esep) | append "/usr/local/bin")
# Optional Homebrew packages
$env.PATH = ($env.PATH | split row (char esep) | prepend $"(brew --prefix | str trim)/opt/bison/bin")
$env.PATH = ($env.PATH | split row (char esep) | prepend $"(brew --prefix | str trim)/opt/flex/bin")
$env.PATH = ($env.PATH | split row (char esep) | prepend $"(brew --prefix | str trim)/opt/llvm/bin")
$env.PATH = ($env.PATH | split row (char esep) | prepend $"(brew --prefix | str trim)/opt/openjdk/bin")
# Other package managers
$env.PATH = ($env.PATH | split row (char esep) | prepend $"($env.HOME)/.local/bin")
$env.PATH = ($env.PATH | split row (char esep) | prepend $"($env.HOME)/.cargo/bin")
# --- user custom ---
# Set default editor
$env.EDITOR = "nvim"
$env.VISUAL = "codium"
# Alias for Monash compute cluster
$env.OPTCLUSTER = "compute.optimisation-2020.cloud.edu.au"
# CMake settings
$env.CMAKE_EXPORT_COMPILE_COMMANDS = "1" # output compile-commands.json for clangd
$env.CMAKE_GENERATOR = "Ninja Multi-Config" # use Ninja generator by default
$env.CMAKE_C_COMPILER_LAUNCHER = "ccache"
$env.CMAKE_CXX_COMPILER_LAUNCHER = "ccache"
# Homebrew shell setup (brew shellenv)
$env.HOMEBREW_PREFIX = "/opt/homebrew"
$env.HOMEBREW_CELLAR = "/opt/homebrew/Cellar"
$env.HOMEBREW_REPOSITORY = "/opt/homebrew"
$env.INFOPATH = "/opt/homebrew/share/info"
# Set MANPATH
$env.MANPATH = "/usr/share/man:/usr/local/share/man:/Library/TeX/Distributions/.DefaultTeX/Contents/Man:/opt/homebrew/share/man"
### Setup aliases
alias edit = ^($env.VISUAL)
alias start = ^open
alias less = bat
alias set-light-theme = kitty +kitten themes Catppuccin-Latte
alias set-dark-theme = kitty +kitten themes Catppuccin-Macchiato
alias brew-backup = brew bundle dump --global --no-lock --formula --cask --mas --tap --force
alias brew-cleanup = brew bundle cleanup --global --no-lock --force --zap
alias brew-restore = brew bundle install --global --no-lock
# Load autojump plugin "zoxide"
source ~/.cache/zoxide/zoxide.nu
# Load completions
source ~/.cache/nu_scripts/custom-completions/cargo/cargo-completions.nu
source ~/.cache/nu_scripts/custom-completions/git/git-completions.nu
source ~/.cache/nu_scripts/custom-completions/make/make-completions.nu
source ~/.cache/nu_scripts/custom-completions/npm/npm-completions.nu
source ~/.cache/nu_scripts/custom-completions/typst/typst-completions.nu

View File

@ -1,5 +1,5 @@
{
"font_face": "Iosevka Slab",
"font_face": "Iosevka",
"font_size": 15,
"tab_size": 2,
"theme": "auto",

View File

@ -1,9 +1,17 @@
{
"clangd.arguments": [
"--compile-commands-dir=./build.nosync/"
],
"clangd.checkUpdates": true,
"cmake.buildDirectory": "${workspaceFolder}/build.nosync",
"cmake.configureOnOpen": false,
"cmake.environment": {
"CMAKE_C_COMPILER_LAUNCHER": "ccache",
"CMAKE_CXX_COMPILER_LAUNCHER": "ccache"
},
"cmake.generator": "Ninja Multi-Config",
"cmake.installPrefix": "${workspaceFolder}/build.nosync/install",
"editor.fontFamily": "Iosevka Slab, Iosevka, Menlo, Monaco, 'Courier New', monospace",
"editor.fontFamily": "Iosevka, Menlo, Monaco, 'Courier New', monospace",
"editor.fontLigatures": true,
"editor.fontSize": 14,
"editor.formatOnSave": true,
@ -13,21 +21,30 @@
"extensions.ignoreRecommendations": true,
"files.autoSave": "onWindowChange",
"files.insertFinalNewline": true,
"lldb.consoleMode": "evaluate",
"lldb.showDisassembly": "never",
"ltex.additionalRules.enablePickyRules": true,
"ltex.language": "en-GB",
"python.formatting.blackPath": "/opt/homebrew/bin/black",
"python.formatting.provider": "black",
"rust-analyzer.debug.engine": "vadimcn.vscode-lldb",
"rust-analyzer.rustfmt.extraArgs": [
"+nightly"
],
"rust-analyzer.rustfmt.overrideCommand": null,
"shackleLanguageServer.executable": "/Users/dekker1/Library/Mobile Documents/com~apple~CloudDocs/Code/github.com/shackle/target/debug/shackle-ls",
"terminal.external.osxExec": "kitty.app",
"terminal.integrated.confirmOnExit": "hasChildProcesses",
"terminal.integrated.defaultProfile.osx": "Nushell",
"terminal.integrated.scrollback": 10000,
"terminal.integrated.shell.osx": "xonsh",
"window.autoDetectColorScheme": true,
"window.commandCenter": true,
"window.zoomLevel": -0.5,
"workbench.colorTheme": "Catppuccin Latte",
"workbench.preferredDarkColorTheme": "Catppuccin Macchiato",
"workbench.preferredLightColorTheme": "Catppuccin Latte",
"workbench.startupEditor": "none",
"clangd.checkUpdates": true,
"clangd.arguments": ["--compile-commands-dir=./build.nosync/"]
"[python]": {
"editor.defaultFormatter": "ms-python.black-formatter"
},
"sapling.showInlineBlame": true,
"files.exclude": {
"**/.sl": true
},
"cmake.showOptionsMovedNotification": false
}

View File

@ -0,0 +1,15 @@
[ui]
username =Jip J. Dekker <jip@dekker.one>
ignore.userroot = ~/.gitignore
# uncomment to disable color in command output
# (see 'sl help color' for details)
# color = never
# uncomment to disable command output pagination
# (see 'sl help pager' for details)
# paginate = never
[isl]
hasShownGettingStarted = false
render-compact = false

12
run_nushell_generation.nu Normal file
View File

@ -0,0 +1,12 @@
#!/usr/bin/env nu
# Generate zoxide configuration
if (which zoxide | is-empty) == false {
mkdir ~/.cache/zoxide/
zoxide init nushell --hook prompt | save --force ~/.cache/zoxide/zoxide.nu
}
if (which starship | is-empty) == false {
mkdir ~/.cache/starship/
starship init nu | save --force ~/.cache/starship/init.nu
}